{
	name:"Polygon",
	_extends : {
		key:"AbstractTool",
		path:"./paint_tool/abstract-tool.action"
	},
	importCommand:[{
		key:"Tool",
		path:"./paint_tool/polygon.shape"
	},{
		key:"NumberPicker",
		path:"./paint_plugin/number-picker.plugin"
	}],
	onInit(){
		this.picker = new NumberPicker(this.$event)
		this.state = {n:3}
		this.stepSize = 2
		this.moveSize = 1
		this.ctrlIndex = -1
		this.bind()
	},
	bind(){
		this.picker.on(EN.input_done,(data)=>{
			this.state.n = data.value
		})
		this.on(Cst.focusIn,()=>{
			this.picker.focusIn()
		})
		this.on(Cst.focusOut,()=>{
			this.picker.focusOut()
		})
	},
	getLineMeta(stepData,pos){
		let steps = stepData.step.assign().splice(1)
		return Math.getLineMeta([...steps,steps[0]],pos)
	}
}